﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.StorageClient;

using AzureGames.Data.InMemory;

namespace AzureGames.Data.Utility
{
    class Program
    {
        static void Main(string[] args)
        {
            CloudStorageAccount.SetConfigurationSettingPublisher((configName, configSetter) =>
            {
                // Provide the configSetter with the initial value
                configSetter(ConfigurationManager.AppSettings[configName]);
            });

            //var account = CloudStorageAccount.FromConfigurationSetting("DataConnectionString");
            //var client = account.CreateCloudBlobClient();
            //var blobContainer = client.GetContainerReference("resources");
            //var created = blobContainer.CreateIfNotExist();

            //var x = blobContainer.GetBlobReference("31486a69-09bf-4bf9-a2ca-38b15aa7a808");
            //x.FetchAttributes();
            //var b = x.Metadata;

            //var y = blobContainer.GetBlobReference("resources/31486a69-09bf-4bf9-a2ca-38b15aa7a808");
            //y.FetchAttributes();
            //var q = y.Metadata;
            //var z = blobContainer.GetBlobReference("31486a69-09bf-4bf9-a2ca-38b15aa7a808");
            //var c = z.Metadata;

            //Implementation.ResourceRepository r = new Implementation.ResourceRepository();
            //var x = r.GetResource(new Guid("31486a69-09bf-4bf9-a2ca-38b15aa7a808"));


            RepositoryController controller = new RepositoryController();            
            controller.AddGameDefinitions();
            controller.AddUsers();            



            
        }
    }
}
